//
//  JLCFCommonMacro.h
//  QTZ
//
//  Created by ski on 2017/7/5.
//  Copyright © 2017年 ski. All rights reserved.
//

#ifndef JLCFCommonMacro_h
#define JLCFCommonMacro_h

// 宏函数
#define DBGRect(rect) DBG(@"%s x:%.4f, y:%.4f, w:%.4f, h:%.4f", #rect, rect.origin.x, rect.origin.y, rect.size.width, rect.size.height)
#define DBGSize(size) DBG(@"%s w:%.4f, h:%.4f", #size, size.width, size.height)
#define DBGPoint(point) DBG(@"%s x:%.4f, y:%.4f", #point, point.x, point.y)

/// 宏函数
#define IsEmptyString(str)      (!str || [str.trim isEqualToString : @""])

//debug
#ifdef DEBUG
#define DBG(format, ...) NSLog(format, ## __VA_ARGS__)
#else
#define DBG(format, ...)
#endif


#define weakify( x ) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
__attribute__((objc_ownership(weak))) __typeof__(x) __weak_##x##__ = x; \
_Pragma("clang diagnostic pop")

#define strongify( x ) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
__attribute__((objc_ownership(strong))) __typeof__(x) x = __weak_##x##__; \
_Pragma("clang diagnostic pop")

//
//#define majiabao            [_params setSafeObject:@"1" forKey:@"label"]
#define majiabao

#define QTZ_SCHEME  @"qtz"

//#define QTZ_BASE_URL    @"https://www.qtz360.com/v2.3.1/rest"//正式
//#define IMAGE_ROOT_URL @"https://img.qtz360.com/mobile"      //"

//#define QTZ_BASE_URL    @"http://test.qianchubao.cn:8088"// 测试地址

#define QTZ_BASE_URL    @"http://api.jinlicaifu.com"// 正式地址

#define WEB_URL         @"http://html.jinlicaifu.com/views/"
//#define WEB_URL         @"http://jlcfhtml.qianchubao.cn/h5/views/"

#define QTZ_REQUEST_URL(path)   [NSString stringWithFormat:@"%@/%@", QTZ_BASE_URL, path]
#define QTZ_WEB_URL(path)       [NSString stringWithFormat:@"%@%@", WEB_URL, path]

#endif /* JLCFCommonMacro_h */
